home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / mosmllib / test / auxil.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  371 b   |  16 lines  |  [TEXT/R*ch]

  1. (* test/auxil.sml -- Auxiliary functions for test cases *)
  2.  
  3. infix 1 seq
  4. fun e1 seq e2 = e2;
  5. fun check b = if b then "OK" else "WRONG";
  6. fun check' f = (if f () then "OK" else "WRONG") handle _ => "EXN";
  7.  
  8. fun range (from, to) p = 
  9.     let open Int 
  10.     in
  11.     (from > to) orelse (p from) andalso (range (from+1, to) p)
  12.     end;
  13.  
  14. fun checkrange bounds = check o range bounds;
  15.  
  16.